﻿@model ItemModel
@using NewLife;
@using NewLife.Cube
@using XCode;
@using XCode.Configuration;
@{
	var name = Model.Name;
	var value = (Boolean)Model.Value;
	var type = Model.Type;

	var atts = HtmlHelper.AnonymousObjectToHtmlAttributes(Model.HtmlAttributes);
	if (!atts.ContainsKey("class")) atts.Add("class", "custom-switch-input");
}
<label class="custom-switch">
	@Html.CheckBox(name, value, atts)
	<span class="custom-switch-indicator"></span>
	<span class="custom-switch-description">@Model.Name</span>
</label>
